{extend name="base/main" /}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="ibox float-e-margins">
		<div class="ibox-title">
			<h5>内容管理 / 分类管理</h5>
			<div class="ibox-tools">
				<a class="collapse-link">
					<i class="fa fa-chevron-up"></i>
				</a>
				<a class="close-link">
					<i class="fa fa-times"></i>
				</a>
			</div>
		</div>
		<div class="ibox-content">
			<div class="row row-lg">
				<div class="col-sm-12">
					<div class="fixed-table-toolbar">
						<div class="bars pull-left">
							<a href="{:url('category/add')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>&nbsp;&nbsp;添加</a>
							<a href="#" class="btn btn-sm btn-primary ajax-post" target-form="id" url="{:url('category/edit')}"><i class="fa fa-edit"></i>&nbsp;&nbsp;编辑</a>
							<a href="#" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('category/remove')}"><i class="fa fa-close"></i>&nbsp;&nbsp;删除</a>
							<a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('category/state',['status'=>1])}"><i class="fa fa-check"></i>&nbsp;&nbsp;启用</a>
							<a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('category/state',['status'=>2])}"><i class="fa fa-ban"></i>&nbsp;&nbsp;禁用</a>
						</div>
					</div>
					<div class="example-wrap">
						<div class="example">
							<table class="table table-hover">
								<thead>
									<tr>
										<th style="width:2%"><input type="checkbox" class="i-checks check-all"></th>
										<th style="width:3%">编号</th>
										<th style="width:5%">排序</th>
										<th style="width:5%">分类图标</th>
										<th style="width:5%">是否启用</th>
										<th>分类名称</th>
										
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									{volist name="list" id="vo"}
									<tr class="tbody" level="{$vo.level}">
										<td><input type="checkbox" class="i-checks ids" name="id[]" value="{$vo.id}"/></td>
										<td>{$vo.id}</th>
										<td><input type="text" style="width:50px;height:25px" class="form-control" onblur="cthink.editsorts(this)" data="{$vo.id}" data-url="{:url('category/catesort')}" value="{$vo.sort}" /></th>
										<td>{$vo.icon}</th>
										<td>
											<?php if($vo['status'] == '1'){ ?>
												<i class="fa fa-check text-navy"></i>
											<?php }else{ ?>
												<i class="fa fa-check fa-close"></i>
											<?php } ?>
										</td>
										<td>{$vo.title_show}<span class="message_{$vo.id}"></span></th>
										<td>
											<a href="{:url('category/edit',['id'=>$vo['id']])}" class="btn btn-xs btn-white"><i class="fa fa-pencil"></i> 编辑 </a>
											<a href="javascript:void(0);" class="btn btn-xs btn-white confirm tabledel ajax-post" target-form="id" url="{:url('category/remove',['id'=>$vo['id']])}"><i class="fa fa-times-circle"></i> 删除 </a>
										</td>
									</tr>
									{/volist}
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>	
	</div>	
</div>
{/block}